﻿using Microsoft.EntityFrameworkCore;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading;
using System.Threading.Tasks;
using wt.wine.Application.Common.Models;
using wt.wine.Application.ManageSkutable;
using wt.wine.Domain.Entities;

namespace wt.wine.Application.Common.Interfaces
{
    public interface IskutableRepository
    {
        Task<skutable> GetSkuTableById(int id, CancellationToken cancellationToken);

        /// <summary>
        /// 通过登录id获取商品信息
        /// </summary>
        /// <param name="userid"></param>
        /// <param name="cancellationToken"></param>
        /// <returns></returns>
        Task<List<GetSkutableNameByUserIdDTO>> GetSkutableNameListByUserId(int userid, CancellationToken cancellationToken);

        /// <summary>
        /// 添加商品
        /// </summary>
        /// <param name="model"></param>
        /// <param name="cancellation"></param>
        /// <returns></returns>
        Task AddSkutable(skutable model, CancellationToken cancellation);

        /// <summary>
        /// 通过商品id 获取需要修改的商品
        /// </summary>
        /// <param name="id"></param>
        /// <param name="userid"></param>
        /// <param name="cancecllationtoken"></param>
        /// <returns></returns>
        Task<skutable> GetSkutableById(int id, int userid, CancellationToken cancecllationtoken);

        /// <summary>
        /// 修改商品信息
        /// </summary>
        /// <param name="model"></param>
        /// <param name="cancellationtoken"></param>
        /// <returns></returns>
        Task EditSkutable(skutable model, CancellationToken cancellationtoken);

        /// <summary>
        /// 【经销商】产品列表管理
        /// </summary>
        /// <param name="userid"></param>
        /// <param name="pageIndex"></param>
        /// <param name="pageSize"></param>
        /// <param name="cancellationtoken"></param>
        /// <returns></returns>
       Task<PaginatedList<GetSkutableListDTO>> GetSkuTableList(int userid, int pageIndex, int pageSize, CancellationToken cancellationtoken);

        /// <summary>
        /// 设备 加酒 获取商品列表
        /// </summary>
        /// <param name="userid"></param>
        /// <param name="pageIndex"></param>
        /// <param name="pageSize"></param>
        /// <param name="cancellationtoken"></param>
        /// <returns></returns>
        Task<PaginatedList<GetSkuTableNameAddWineListDTO>> GetProductNameByAddWine(int userid, int pageIndex, int pageSize, CancellationToken cancellationtoken);
    }
}
